<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "{{%web_config}}".
 *
 * @property integer $id
 * @property string $accesstoken
 */
class WebConfig extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%web_config}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['accesstoken'], 'string', 'max' => 255],
            [['office_ipaddress'], 'string', 'max' => 20],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'accesstoken' => Yii::t('app', 'accesstoken'),
            'office_ipaddress' => Yii::t('app', '微信官方IP地址'),
        ];
    }

    /**
     * @inheritdoc
     * @return WebConfigQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new WebConfigQuery(get_called_class());
    }
}
